package com.lemon.stock.entity

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey

@Entity(tableName = "trade")
data class Trade(
    @ColumnInfo(name = "stock_id") val stockId: String,
    @ColumnInfo(name = "invest_index") val investIndex: Int, //投资批次
    @ColumnInfo(name = "stock_amount") var stockAmount: Int,
    @ColumnInfo(name = "buy_date") val buyDate: Long,
    @ColumnInfo(name = "sell_date") var sellDate: Long=0,
    @ColumnInfo(name = "buy_price") val buyPrice: Float,
    @ColumnInfo(name = "sell_price") var sellPrice: Float=0F,
    @ColumnInfo(name = "commission_money") var commissionMoney: Float = 0F,
    @ColumnInfo(name = "transfer_money") var transferMoney: Float = 0F,
    @ColumnInfo(name = "bonus_money") var bonusMoney: Float = 0F,
    @ColumnInfo(name = "tax_money") var taxMoney: Float = 0F,
    @ColumnInfo(name = "bonus_tax") var bonusTax: Float = 0F,
    @ColumnInfo(name = "profit_money") var profitMoney: Float=0F,
    @ColumnInfo(name = "profit_ratio") var profitRatio: Float=0F,
    @ColumnInfo(name = "hold_days") var holdDays: Int=0,
    @ColumnInfo(name = "bonus_id") var bonusId: Long=0,
    @ColumnInfo(name = "status") var status: Int=8 //8持仓 9卖出 10完结（批次完结）

) {
    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(name = "id")
    var id: Long = 0

}
